The present invention relates to a comparator circuit for comparing an input signal with a reference voltage.
A comparator circuit basically comprises a differential amplifier provided with a pair of input terminals (a non-inverting input terminal and an inverting input terminal) and an output terminal.
An input signal and a reference voltage are applied to the pair of input terminals, respectively and the differential amplifier compares the input signal with the reference voltage. As is well known in the art, the reference voltage is set at approximately center of high and low levels of the input signal, and the differential amplifier produces a first level (e.g. a power voltage V.sub.DD) of output when the input signal is larger or higher than the reference voltage and a second level (e.g. a ground potential) of output when the input signal is smaller or lower than the reference voltage thereby to achieve the comparison of the input signal and the reference voltage.
The above-mentioned comparator circuit operates accurately as far as the reference voltage is at the approximately center of the high and low levels of the input signal. However, in the case where the input signal is shifted in level due to noise or the like and both of the high and low levels of the input signal are higher or lower than the reference voltage, the differential amplifier always produces a first or a second level of output irrespective of the state of the input signal, resulting in failure in the comparison between the input signal and the reference voltage. Also in the case where the reference voltage is shifted above the high level of the input signal or lower the low level of the input signal due to fluctuation of the power voltage, the differential amplifier fails to achieve the comparison between the input signal and the reference voltage.